import {getData, postData} from "./http";

export const getAllCategory = (currentPage,size,data) => getData(`/category/getAllCategory?currentPage=${currentPage}&size=${size}`, data);

export const addCategory = (data) => postData(`/category/addCategory`, data);

export const editCategory = (data) => postData(`/category/editCategory`, data);

export const getCategoryById = (data) => postData(`/category/getCategoryById`, data);

export const listSecondLevelCategories  = () => getData(`/category/listSecondLevelCategories`);

export const deleteCategoryById = (data) => postData(`/category/deleteCategoryById`, data);
